package com.stm.bi.api;

import com.stm.framework.annotation.RestApi;
import com.stm.framework.annotation.Module;
import org.springframework.web.bind.annotation.*;
import com.stm.framework.annotation.ReqParam;
import com.stm.framework.dto.Response;
import com.stm.bi.dto.query.SubjectListQry;
import com.stm.bi.service.SubjectService;
import jakarta.annotation.Resource;
import com.stm.bi.dto.vo.SubjectVO;
import java.util.List;

/**
 * 科目RPC服务
 * @author qinyongjie
 * @date 2025-05-22
 */

@RestController
@Module("科目.RPC接口")
public class SubjectRemoteServiceImpl implements SubjectRemoteService{
    @Resource
    private SubjectService subjectService;

    /**
    * 科目详细查询
    */
    @RestApi(name = "科目详细查询", author = "qinyongjie", idx=1)
    @GetMapping(value = "/rpc/subject/{id}")
    public Response<SubjectVO> selectById(@PathVariable("id")@ReqParam(label = "id",required = true) Long id){
        return subjectService.selectById(id);
    }


    /**
    * 科目列表查询
    */
    @RestApi(name = "科目列表查询", author = "qinyongjie", idx=1)
    @GetMapping(value = "/rpc/subject/selectList")
    public Response<List<SubjectVO>> selectList(SubjectListQry subjectListQry){
         return subjectService.selectList(subjectListQry);
    }

}
